package org.eiahe.hr.training.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.ehe.common.excel.convert.ExcelDictConvert;
import org.eiahe.hr.training.domain.HrTrainingRecord;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 培训记录视图对象 hr_training_record
 *
 * @author zhangnn
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = HrTrainingRecord.class)
public class HrTrainingRecordVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 培训记录ID
     */
    @ExcelProperty(value = "培训记录ID")
    private Long recordId;

    /**
     * 员工ID
     */
    private Long employeeId;

    /**
     * 工号
     */
    @ExcelProperty(value = "工号")
    private String employeeNo;

    /**
     * 员工姓名
     */
    @ExcelProperty(value = "员工姓名")
    private String employeeName;

    /**
     * 部门ID
     */
    private Long deptId;

    /**
     * 部门名称
     */
    @ExcelProperty(value = "部门")
    private String deptName;

    /**
     * 课程ID
     */
    private Long courseId;

    /**
     * 课程名称
     */
    @ExcelProperty(value = "课程名称")
    private String courseName;

    /**
     * 培训类型（1内部培训 2外部培训 3在线学习 4其他）
     */
    @cn.idev.excel.annotation.ExcelProperty(value = "培训类型", converter = ExcelDictConvert.class)
    @org.ehe.common.excel.annotation.ExcelDictFormat(dictType = "hr_training_type")
    private String trainingType;

    /**
     * 培训日期
     */
    @ExcelProperty(value = "培训日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date trainingDate;

    /**
     * 培训时长（小时）
     */
    @ExcelProperty(value = "培训时长(小时)")
    private BigDecimal trainingDuration;

    /**
     * 培训地点
     */
    @ExcelProperty(value = "培训地点")
    private String trainingLocation;

    /**
     * 培训讲师
     */
    @ExcelProperty(value = "培训讲师")
    private String trainer;

    /**
     * 培训内容
     */
    @ExcelProperty(value = "培训内容")
    private String trainingContent;

    /**
     * 考试成绩
     */
    @ExcelProperty(value = "考试成绩")
    private BigDecimal examScore;

    /**
     * 是否通过（0未通过 1通过）
     */
    @cn.idev.excel.annotation.ExcelProperty(value = "是否通过", converter = ExcelDictConvert.class)
    @org.ehe.common.excel.annotation.ExcelDictFormat(readConverterExp = "0=未通过,1=通过")
    private String passStatus;

    /**
     * 证书编号
     */
    @ExcelProperty(value = "证书编号")
    private String certificateNo;

    /**
     * 证书附件地址
     */
    private String certificateUrl;

    /**
     * 培训效果（1优秀 2良好 3一般 4较差）
     */
    @cn.idev.excel.annotation.ExcelProperty(value = "培训效果", converter = ExcelDictConvert.class)
    @org.ehe.common.excel.annotation.ExcelDictFormat(dictType = "hr_training_effect")
    private String trainingEffect;

    /**
     * 状态（0待审核 1已通过 2已驳回）
     */
    @cn.idev.excel.annotation.ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @org.ehe.common.excel.annotation.ExcelDictFormat(readConverterExp = "0=待审核,1=已通过,2=已驳回")
    private String status;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

}
